
fn main() {
    println!("Hello, world!");
    // let user_obj = user::User {
    //     name: String::from("张三"),  // 初始化name字段 // 初始化age字段
    //     email: String::from("user_001"),// 初始化id字段
    // };
    // let s1=user_obj;
    // let s2=s1;
    // println!("{}{}", s2, s1)
    let age:i32=25;
    println!("{}",age);
    let height:f64=1.75;
    println!("{}",height);
    let is_student=true;
    println!("{}", is_student);
    let init:char='A';
    println!("{}", init);
    let mut name=String::from("Alice");
    name=String::from("Bob");
    println!("{}",name);
    let mut num=3;
    num= if_else(num);
    println!("{}", num);
}
fn if_else(num:i32) -> i32 {
    if num>0 {
        println!("num is 正式");
    }else {
        println!("num is 复数");
    }
    return num;
}
